import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import "./assets/reset.css"
// 引入 echarts图表插件
import * as echarts from 'echarts';
// 引入  ElementPlus
import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';
import 'dayjs/locale/zh-cn'
import locale from 'element-plus/lib/locale/lang/zh-cn'

//引入axios vue-axios
import axios from 'axios';
import VueAxios from 'vue-axios';


// http request 拦截器
axios.interceptors.request.use(config=>{
    // console.log(config);
    config.headers.token = window.sessionStorage.getItem("access_token")
    return config;
});


createApp(App)
    .use(VueAxios, axios)
    .use(ElementPlus, { locale })
    .use(store)
    .use(router)
    .mount('#app')
